import {
	allMessageNum
} from '@/api/message.js'

// 获取消息总数
export const setMessageBadge = async () => {
	const {
		data = []
	} = await allMessageNum()
	if (data == 0) {
		uni.removeTabBarBadge({
			index: 1
		});
	} else {
		uni.setTabBarBadge({
			index: 1,
			text: data + ''
		})
	}
}